FIG. 8 shows a conventional sensor threshold circuit. This sensor threshold circuit includes: a four-terminal sensor 10; a voltage comparator 20; a sensor drive current detecting circuit 30; a sensor bias current generating circuit 50; and a bias current switching circuit 70, and obtains a sensor output voltage VSO (=VP−VN) by use of a sensor input BIN applied from the exterior, for instance, magnetic field. In this configuration, the bias current switching circuit 70 switches between resistors RO and RR to change a sensor bias current IB, whereby a digital output voltage VO with a hysteresis characteristic as shown in FIG. 9 is made available in receipt of the sensor input BIN (See Patent Document 1, for example).
FIG. 9 is a circuit diagram indicative of the relationship between the sensor input BIN and the output voltage VO in the sensor threshold circuit with the hysteresis characteristic. When the sensor input BIN is increased, the output voltage VO is decreased from VOH to VOL at a threshold point BOP. On the other hand, when the sensor input BIN is decreased, the output voltage VO is increased from VOL to VOH in an opposite manner at a threshold point BRP smaller than threshold point BOP. Accordingly, the digital output voltage VO with a hysteresis width |BH| is obtainable.
Next, the operation of the conventional threshold circuit will be described with reference to FIG. 8.
Firstly, the threshold point occurring when a switch SWO is conductive and a switch SWR is opened in the bias current switching circuit 70 of FIG. 8 will be described with reference to FIG. 10. For brief description, FIG. 10 shows a circuit configuration indicative of the four-terminal sensor 10, the voltage comparator 20, and the sensor bias current IBO extracted, with the switch SWO conductive and the SWR opened, from the bias current switching circuit 70 of FIG. 8.
In order to facilitate the analysis, firstly, it is assumed that a resistance value of a resistor RS for detecting a sensor drive current IS is considered to be much smaller than the resistance values of sensor resistors R1, R2, R3, and R4. It is also assumed that a drive terminal voltage VCC2 be equal to a sensor drive voltage VCC, accordingly. The resistance value of a sensor drive current detecting resistor RS may take any value, because the result to be produced later will exhibit that the threshold point is not dependent on the sensor drive voltage VCC.
At this point, the current IBO generated by the sensor bias current generating circuit 50 is shown as the following expression (1), where IS represents the sensor drive current.IBO=IS×RS/RO  (1)
For simplification, a current mirror ratio 1/KO is defined as follows.1/KO=RS/RO  (2)
Now, as shown in FIG. 10, the following expressions (3a) to (3c) are satisfied, where I1 represents current flowing through the sensor resistor R1, I2 represents current flowing through the sensor resistors R3 and R4, VP represents a connection point of the sensor resistors R1 and R2, and VN represents the potential of the connection point of the sensor resistors R3 and R4.I1=(VCC−VP)/R1  (3a)I2=VCC/(R3+R4)  (3b)VP/R2=I1+(I1+I2)/KO  (3c)
When VP is solved,VP=VCC×[(1+1/KO)/R1+1/{KO×(R3+R4)}]/(1/R2+(1+1/KO)/R1)  (4)is satisfied. The voltage comparator 20 switches at the voltage satisfying VP=VN, thereby forming the following expression (5).VCC×[(1+1/KO)/R11/{KO×(R3+R4)}]/{1/R2+(1+1/KO)/R1}=R4×VCC/(R3+R4)  (5)
In the four-terminal sensor 10, in response to the sensor input BIN applied from the exterior, it is assumed that the balance be lost among the resistors R1, R2, R3, and R4, thereby resulting in R1=R4=R+ΔR, R2=R3=R−ΔR, or R1=R4=R−ΔR, R2=R3=R+ΔR. The sensor output voltage VSO (=VP−VN) will be generated. Accordingly, if R1=R4=R+ΔR and R2=R3=R−ΔR are satisfied, the expression (5) is formed as follows:[(1+1/KO)/(R+ΔR)+1/{KO×(R−ΔR+R+ΔR)}]/(1/(R−ΔR)+(1+1/KO)/(R+ΔR)=(R+ΔR)/(R−ΔR+R+ΔR)  (6)
Then, ΔR/R satisfying the above expression (6) is solved.
                                                                        ΔR                /                R                            =                            ⁢                              1                /                                  [                                      (                                          2                      ×                                              K                        O                                            ×                                              {                                                  1                          +                                                      1                            /                                                          (                                                              2                                ×                                                                  K                                  O                                                                                            )                                                                                                      }                                                              ]                                                                                                                          ≈                            ⁢                              1                /                                  (                                      2                    ×                                          K                      O                                                        )                                            ≡                              B                OP                                                                        (        7        )            
That is to say, ΔR/R satisfying the above expression (7) is the threshold point BOP. In this sense, the output voltage from a general sensor ranges from several hundreds microvolts to several tens millivolts, whereas the sensor drive voltage substantially ranges from 1 V to 5 V. Approximation is achieved with KO considered to be a sufficiently great value.
Likewise, the threshold point occurring when the switch SWO is opened and the switch SWR is conductive in the bias current switching circuit 70 of FIG. 8 will be described with reference to FIG. 11. For brief description, FIG. 11 shows a circuit configuration indicative of the four-terminal sensor 10, the voltage comparator 20, and the sensor bias current IBR extracted, with the SWO opened and the switch SWR conductive, from the bias current switching circuit 70 of FIG. 8.
At this point, current IBR generated by the sensor bias current generating circuit 50 is shown as the following expression (8).IBR=IS×RS/RR  (8)
For simplification, a current mirror ratio 1/KR is defined as follows.1/KR=RS/RR  (9)
Here, the current is defined as shown in FIG. 11, so the current mirror ratio 1/KO, in a case where IBO represents the sensor bias current, is equal to 1/KR, and considered in the same manner. ΔR/R is given by the following expression (10), when VP=VN is satisfied.ΔR/R≈1/(2×KR)≡BRP  (10)
That is to say, ΔR/R satisfying the above expression (10) is the threshold point BRP.
The hysteresis width |BH|, which is produced by switching between the switch SWO and the switch SWR in the bias current switching circuit 70, will now be discussed.
The hysteresis width |BH| is obtained by the following expression (11).
                                                                                        BH                                            =                                                                                    B                    OP                                    -                                      B                    RP                                                                                                                                          =                                                                                    1                    /                                          (                                              2                        ×                                                  K                          O                                                                    )                                                        -                                      1                    /                                          (                                              2                        ×                                                  K                          R                                                                    )                                                                                                                                                              =                                                                                    R                    S                                    ×                                                            (                                                                        1                          /                                                      R                            O                                                                          -                                                  1                          /                                                      R                            R                                                                                              )                                        /                    2                                                                                                                          (        11        )            
FIG. 12 depicts the relationship of the threshold points BOP and BRP, the hysteresis width |BH|, and the sensor drive current detecting resistor RS which are obtained from the above expressions (7), (10), and (11).
As shown in FIG. 12, in the conventional sensor threshold circuit, it turns out that when the threshold point is varied by changing the resistor RS of the sensor drive current detecting circuit 30, the hysteresis width |BH| is also varied. This is also exhibited by the above expression (11).
Patent Document 1: JP 2001-108480 A
It is to be noted, however, that when the threshold point is varied by changing the resistor RS as described above in the conventional sensor threshold circuit, the hysteresis width |BH| is also varied in the same manner. The hysteresis width |BH| reduces the variations in the output caused by sensor output noises. Hence, when the threshold point is varied, there is a drawback in that the influences of the output variations caused by the sensor output noises are different depending on the threshold point, due to the variations in the hysteresis width |BH|.
Moreover, when the threshold point is varied by changing the resistor RO and the resistor RR, the hysteresis width |BH| that is not dependent on the change in the threshold point is obtainable. However, two output terminals are needed to change the two resistors, thereby leading to another drawback of increasing the chip area and chip costs.
The present invention has been made in view of the above drawbacks, and has an object of providing a sensor threshold circuit that enables variations in a threshold point by changing a single resistor to achieve a hysteresis width that is not dependent on the variations in the threshold point.